// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PerformanceLogger.java

package com.boci.common.util;

import java.util.logging.Logger;

// Referenced classes of package com.boci.common.util:
//            CMLogger

public class PerformanceLogger
{

    public PerformanceLogger()
    {
    }

    public static void startAppTimer()
    {
        lngAppStartTime = System.currentTimeMillis();
        lngConnStartTime = 0L;
        lngConnEndTime = 0L;
    }

    public static void stopAppTimer()
    {
        lngAppEndTime = System.currentTimeMillis();
    }

    public static void startConnTimer()
    {
        lngConnStartTime = System.currentTimeMillis();
    }

    public static void stopConnTimer()
    {
        lngConnEndTime = System.currentTimeMillis();
    }

    public static void doLog(String pMsg)
    {
        long lngTotalPeriod = lngAppEndTime - lngAppStartTime;
        long lngConnPeriod = lngConnEndTime - lngConnStartTime;
        long lngAppPeriod = lngTotalPeriod - lngConnPeriod;
        logger.info((new StringBuilder()).append(pMsg).append(",").append(lngTotalPeriod).append(",").append(lngAppPeriod).append(",").append(lngConnPeriod).toString());
    }

    private static long lngAppStartTime;
    private static long lngAppEndTime;
    private static long lngConnStartTime;
    private static long lngConnEndTime;
    private static Logger logger = CMLogger.getInstance();

}
